package whut.edu.lambda;

public class LambdaTest05 {
    public static void main(String[] args) {
        useAdd(new AddInter() {
            @Override
            public int calc(int a, int b) {
                return a+b;
            }
        });

        useAdd((a,b)-> a-b);
    }
    public static void useAdd(AddInter addInter){
        int re = addInter.calc(10,50);
        System.out.println(re);
    }
}
interface AddInter{
    int calc(int a,int b);
}